<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page trimDirectiveWhitespaces="true" %> 
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>

<c:set var="ctx" value="${pageContext.request.contextPath}" />

<div id="main-content">
	<div class="col-lg-12">
		<p class="legend">修改活动信息</p>
		<form id="update-form" class="form-horizontal">
			<div class="form-group">
			<input type="hidden" name="id" class="form-control required" value="${preferential.id }"/>
			<input type="hidden" name="user.id" class="form-control required" value="${preferential.user.id }"/>
			<input type="hidden" name="photoId" class="form-control required" value="${preferential.photoId }"/>
			<div class="form-group">
				<label for="name" class=""><b>活动名：</b></label>
				<input type="text" id="name" name="name" class="form-control required" readonly="readonly" value="${preferential.name }"/>
			</div>
				<label for="lastName" class=""><b>活动状态：</b></label>
				<select name="status" id="status">
					<option value="0" <c:if test="${preferential.status == '0' }">selected</c:if>>预审</option>

					<option value="1" <c:if test="${preferential.status == '1' }">selected</c:if>>进行中</option>
					<option value="2" <c:if test="${preferential.status == '2' }">selected</c:if>>关闭</option>
				</select>
		
				<label for="" class=""><b>活动分类：</b></label>
				<input type="hidden" name="projectCategory" id="${preferential.projectCategory.id }"/>
				<select name="projectOpen" id="projectOpen">					
				</select>
					
				<%-- <label for="" class=""><b>活动收益分类：</b></label>
				<input type="hidden" name="benefitcategory" id="${project.projectBenefit.id }"/>
				<select name="projectBenefit" id="projectBenefit">					
				</select> --%>
			</div>
			<div class="form-group"  id="project-tags">
				<label for="lastName" id="tags" style="display:none" class=""><b>活动标签：</b></label>
				<span id="hot" style="display:none">
					<label class="checkbox"><input name="tags.hot" type="checkbox" id="checkbox_1" 
						value="hot" <c:if test="${fn:contains(preferential.tags,'hot,')}">checked</c:if>>页面滚动活动
					</label>
				</span> 
 				<span id="needatt" style="display:none"><label class="checkbox"><input name="tags.needatt" type="checkbox" id="checkbox_2" value="needatt" <c:if test="${fn:contains(preferential.tags,'needatt,')}">checked</c:if>>需要关注的 </label></span>
				<%-- <span id="needrec" style="display:none"><label class="checkbox"><input name="tags.needrec" type="checkbox" id="checkbox_3" value="needrec" <c:if test="${fn:contains(project.tags,'needrec,')}">checked</c:if>>需要推荐的</label></span> --%> 
				<span id="needsup" style="display:none"><label class="checkbox"><input name="tags.needsup" type="checkbox" id="checkbox_4" value="needsup" <c:if test="${fn:contains(preferential.tags,'needsup,')}">checked</c:if>>需要支持的</label></span>
			
			</div>
<!-- 			<div class="form-group">
				<label for="name" class=""><b>筹款时间：</b></label>
				<div class="input-append">
					<input type="text" id="validDays" name="validDays" class="form-control required" value="${project.validDays }"style="width:178px;"/><span class="add-on">天</span>
				</div>
		</div>
 -->		<!-- <div style="width:40%;margin-top:10px;">
				<span><b>商品：</b></span><span class="pull-right"><button class="btn-link" data-toggle="modal" data-target="#upModal">添加</button></span>
				<div id="productsList" style="margin-bottom:5px;"></div>
			</div> -->
			<div class="form-group">
				<div class=" ">
					<button type="button" class="btn btn-primary add-submit">保存</button>
				</div>
			</div>
		</form>
	</div>



<c:if test="${env == 'production' }">
	<script type="text/javascript">
		seajs.use("${ctx}/assets/js-dist/admin/preferential-edit-page");
	</script>


</c:if>
<c:if test="${env != 'production' }">
	<script type="text/javascript">
		seajs.use("${ctx}/assets/js/admin/preferential-edit-page");
	</script>
</c:if>